<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Operat_type_Mod extends MY_Model {
	function __construct() {
		parent::__construct ();
		
		parent::newcrud ( 'operat_type' );
	}
	
	public function create() {
		
		$data = array ('type_name' => $_POST ["type_name"] );
		parent::create ( $data );
	
	}
	
	public function read_all() {
		return parent::read_all ();
	
	}
	
	public function read_byid($id) {
		return parent::read_byid ( $id );
	}
	
	public function updata_byid($id) {
		
		$data = array ('type_name' => $_POST ["type_name"] );
		if ($data ['id'] == 1) {
			return;
		}
		parent::updata_byid ( $id, $data );
	}
	
	public function delete($id) {
		parent::delete ( $id );
	}

}

?>
